(function ($) {
	$.Notification = function (settings) {
		var defaults = {
			timeout: null,
			message: "",
			icon: "glyphicon glyphicon-info-sign",
			css: "alert alert-info"
		};

		settings = $.extend(defaults, settings);

		var container = $("<div>");
		var icon = $("<span>", { Class: settings.icon, style: 'float: left; margin-right: .3em;' });
		icon.appendTo(container);
		
		var message = $("<span>");
		message.html(settings.message);
		message.appendTo(container);
		
		$.floatingMessage("", { time: settings.timeout, className: settings.css, body: container });
	}

	$.NotificationInfo = function (msg) {
		$.Notification({ timeout: 5000, message: msg });
	}

	$.NotificationError = function (msg) {
	    $.Notification({ message: msg, icon: "glyphicon glyphicon-question-sign", css: "alert alert-danger" });
	}

	$.NotificationClear = function () {
		$(".floating-message").trigger("destroy.fms");
	}
})(jQuery);